local beilunchaosheng = fk.CreateSkill {
  name = "beilunchaosheng",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["beilunchaosheng"] = "潮生",
  [":beilunchaosheng"] = "锁定技，游戏开始时令所有梦势力角色的最大生命值+1，你存活时令梦之队成员摸牌阶段额外摸一张牌。",
}

beilunchaosheng:addEffect(fk.GameStart, {
  can_trigger = function(self, event, target, player, data)
        return player:hasSkill(self)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    for _, p in ipairs(room:getAlivePlayers()) do
     -- 为每个存活玩家添加 "n_fenliang" 技能
     -- 第三个参数 nil 表示不指定技能的额外参数，第四个参数 false 表示不是临时添加技能
     if p.kingdom == "dream" then
      -- 指示目标玩家指向额外目标
       room:changeMaxHp(p, 1)
       room:recover({
      who = p,
      num = 1,
      recoverBy = p,
      skillName = self.name,
    })

      end
    end
  end,
})

beilunchaosheng:addEffect(fk.DrawNCards, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
        return player:hasSkill(self) and not player.dead and target.kingdom == "dream"
    end,
  on_use = function(self, event, target, player, data)
    data.n = data.n + 1
  end,
})

return beilunchaosheng